Olaf adds tools to build RPM distribution.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 7 Nov 2005 15:32:04 +0000 (15:32 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 7 Nov 2005 15:32:04 +0000 (15:32 +0000)
gpsbabel/AUTHORS [new file with mode: 0644]
gpsbabel/Makefile
gpsbabel/tools/mkchangelog
gpsbabel/tools/mkrpm [new file with mode: 0755]

diff --git a/gpsbabel/AUTHORS b/gpsbabel/AUTHORS
new file mode 100644 (file)
index 0000000..d31b97c
--- /dev/null
@@ -0,0 +1,48 @@
+Authors, the people behind GPSBabel
+
+Chief Babel-Head:
+
+* Robert Lipe <robertlipe@usa.net>               
+
+Major contributors:
+
+* Alex Mottram <geo_alexm@cox-internet.com>
+* Olaf Klein <o.b.klein@t-online.de>
+* Ronald L. Parker <ron@parkrrrr.com>
+
+Other contributors and helpers:
+
+* Alan Bleasby
+* Andrew Arensburger
+* Andrew Kirmse
+* Bernhard Spinnler
+* Bruce Thompson
+* Chris Jones
+* Dave Pawson
+* Eric Cloninger
+* Etienne TASSE
+* Frank Warmerdam
+* Fredie Kern <f.kern@xdesy.de>
+* HSA Systems, Sven Dowideit <sven@hsa.com.au>
+* Jason Rust
+* Jeremy Atherton
+* Jim Bensman
+* Jochen Becker <jb@bepo.com>
+* John Temples
+* Josh McKee
+* Justin Broughton <justinbr@earthlink.net>
+* Kjeld Jensen
+* Mark Bradley <mrcb.sf.gpsb@osps.net>
+* Oyvind Kaurstad
+* P. Rosen
+* Patrick Ohly
+* Paul Merchant
+* Paul Tomblin <ptomblin@xcski.com>
+* Richard Messeder
+* Rick Richardson <rickr@mn.rr.com>
+* Robert Shaw
+* Scott Brynen <scott@brynen.com>
+* Steve Chamberlin <steve.chamberlin@comcast.net>
+* Sven Dovideit
+* Tim Zickus
+* Tobias Minich
index c105e07ea19b047a11f91226270058fe4d5f1f71..674bcc29594b0e2683ea1861ac9adeae129ee41d 100644 (file)
@@ -1,5 +1,10 @@
-VERSIONU=1_2_8-beta11062005
-VERSIOND=1.2.8-beta11062005
+
+VERSU=1_2_8
+VERSD=1.2.8
+RELEASE=-beta11072005
+VERSIONU=$(VERSU)$(RELEASE)
+VERSIOND=$(VERSD)$(RELEASE)
+
 # VERSIONU=1_2_7
 # VERSIOND=1.2.7
 
@@ -148,6 +153,13 @@ release:
        curl -u anonymous:anonymous --upload-file /tmp/gpsbabel-$(VERSIOND).tar.gz ftp://upload.sf.net/incoming/
        curl -u anonymous:anonymous --upload-file /tmp/gpsbabel-$(VERSIOND).zip ftp://upload.sf.net/incoming/
 
+rpm: clean
+       tools/mkrpm $(VERSD) $(RELEASE)
+
+rpmrelease:
+       curl -u anonymous:anonymous --upload-file /usr/src/redhat/SRPMS/gpsbabel-$(VERSIOND).src.rpm  ftp://upload.sf.net/incoming/ 
+       curl -u anonymous:anonymous --upload-file /usr/src/redhat/RPMS/i386/gpsbabel-$(VERSIOND).i386.rpm  ftp://upload.sf.net/incoming/ 
+
 mac-usbfree:
        make LIBEXPAT=/sw/lib/libexpat.a EXTRA_CFLAGS="-I/sw/include" LIBUSB= INHIBIT_USB=-DNO_USB
 
index 6f7c80b0ea170ac84fb1d54677b8c511ec1729ef..9d1a27d405ec0156f62698ebc47863e1b9c91732 100755 (executable)
@@ -3,11 +3,11 @@
 # creates a RPM compatible ChangeLog file from babelweb/changes.html 
 # (published at http://www.gpsbabel.org)
 #
-# !!! requires changes.html in current directory !!!
-# output results to stdout
+# !!! input from stdin and output to stdout !!!
 #
 
-cat changes.html |
+LANG='POSIX'; export LANG > /dev/null
+
 sed -e :a -e 's/<[^<]*>/ /g;/</{N;s/\n/ /;ba;}' | # remove most html tags
 sed -e 's/&nbsp;/ /g' -e 's/&amp;/\&/g' -e 's/&gt;/\>/g' -e 's/&lt;/\</g'| # replace HTML special chars
 sed -e 's/^[ \t]*//;s/[ \t]*$//' | # trim leading and trailing spaces
diff --git a/gpsbabel/tools/mkrpm b/gpsbabel/tools/mkrpm
new file mode 100755 (executable)
index 0000000..eb6dc1f
--- /dev/null
@@ -0,0 +1,92 @@
+#!/bin/sh
+#
+
+SPEC=gpsbabel.spec
+TAR_IGNORE="--exclude CVS"
+VERSION=$1
+RELEASE=$2
+
+if test -x /usr/bin/rpmbuild; then 
+       RPM=rpmbuild
+else
+       RPM=rpm
+fi
+
+DIR=`pwd`
+TEMPDIR=/tmp/gpsbabel-rpm.$$
+mkdir -p $TEMPDIR
+trap "cd $DIR; rm -fr $TEMPDIR" 0 1 2 3 15
+
+function addspec()
+{
+       echo "$*" >> $SPEC
+}
+
+# create spec file needed for rpm generation
+function mkspec()
+{
+       local REL=`echo $RELEASE | sed 's/^-//'`
+       test "$REL" == "" && REL=0
+
+       echo -n "" > $SPEC # create the file
+       
+       addspec "Summary:   GPSBabel"
+       addspec "Name:      gpsbabel"
+       addspec "Version:   $VERSION"
+       addspec "Release:   $REL"
+       addspec "License:   GPL"
+       addspec "Group:     File tools"
+       addspec "Source:    %{name}-%{version}.tar.bz2"
+       addspec "BuildRoot: %{_tmppath}/%{name}-%{version}-build"
+       addspec "URL:       http://www.gpsbabel.org"
+       addspec ""
+       
+       addspec "%description"
+       addspec "Converts GPS waypoint, route and track data from one format type to another."
+       addspec ""
+       
+       addspec "Authors:"
+       addspec "--------"
+       
+       cat $DIR/AUTHORS >> gpsbabel.spec
+       
+       addspec ""
+       addspec "%prep"
+       addspec "%setup -q"
+       addspec ""
+       
+       addspec "%build"
+       addspec "make"
+       addspec ""
+       addspec "%install"
+       addspec "rm -rf "
+       addspec "mkdir -p %{buildroot}/usr/bin "
+       addspec "install -m 555 gpsbabel %{buildroot}/usr/bin/gpsbabel "
+       addspec ""
+       
+       addspec "%files"
+       addspec "%defattr(-,root,root)"
+       addspec "/usr/bin/gpsbabel"
+       addspec "%doc README* COPYING CHANGELOG AUTHORS"
+       addspec ""
+       addspec "%changelog"
+}
+
+cd $TEMPDIR
+
+ln -sf $DIR gpsbabel-$VERSION
+
+mkspec
+
+cat ~/src/babelweb/changes.html | $DIR/tools/mkchangelog > gpsbabel-$VERSION/CHANGELOG
+cat gpsbabel-$VERSION/CHANGELOG >> gpsbabel.spec
+
+cp gpsbabel.spec gpsbabel-$VERSION/
+rm -f gpsbabel.spec
+
+tar -cj $TAR_IGNORE -f gpsbabel-$VERSION.tar.bz2  gpsbabel-$VERSION/.
+rm -f gpsbabel-$VERSION
+
+${RPM} -ta gpsbabel-$VERSION.tar.bz2
+
+cd $DIR